ExportGridFloatToFile Subroutine

private subroutine ExportGridFloatToFile(layer, fileName, fileFormat)

export grid_real to file. List of supported format:

  • ESRI_ASCII: ESRI ASCII GRID
  • ESRI_BINARY: ESRI BINARY GRID

Arguments

Type IntentOptional Attributes Name
type(grid_real), intent(in) :: layer
character(len=*), intent(in) :: fileName
integer(kind=short), intent(in) :: fileFormat

Source Code

SUBROUTINE ExportGridFloatToFile &
!
(layer, fileName, fileFormat) 

IMPLICIT NONE

!Arguments with intent(in):
TYPE (grid_real), INTENT (IN) :: layer
CHARACTER (LEN = *), INTENT (IN) :: fileName
INTEGER (KIND = short), INTENT(IN) :: fileFormat 
!------------end of declaration------------------------------------------------

IF ( fileformat == ESRI_ASCII ) THEN
  CALL ExportGridFloatToESRI_ASCII (layer, fileName)
ELSE IF ( fileformat == ESRI_BINARY ) THEN
  CALL ExportGridFloatToESRI_BINARY (layer, fileName)
ELSE
  CALL Catch ('error', 'GridLib',  &
               'unknown option on exporting file: ',  &
               code = unknownOption, argument = fileName )
END IF
 
END SUBROUTINE ExportGridFloatToFile